package com.example.student1.service.impl;

import com.example.student1.dao.CourseRepository;
import com.example.student1.domain.Course;
import com.example.student1.domain.Student_Login;
import com.example.student1.service.CourseService;
import com.example.student1.service.Student_LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service
@Transactional
public class CourseImpService implements CourseService {
    @Autowired
    CourseRepository courseRepository;

/*查询所有学生*/
    public List<Course> findAll() {
        return courseRepository.findAll();
    }

    public List<Course> findByCno(String cno){
        return courseRepository.findByCno(cno);
    }
}
